<%-- 
    Document   : comentario
    Created on : 07-nov-2013, 15:45:24
    Author     : jorge.correa
--%>

<%@page import="java.util.Vector"%>
<%@page import="Conexion.GestionSQL"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
    String strCodigo = request.getParameter("txtCodigo");
    String strSQL="";
    String[] strTemp=null;
    Vector arrFechas = new Vector();
    Vector arrAutores = new Vector();
    Vector arrComentarios = new Vector();
    
    strSQL = "select c.dtFecha, c.txtAutor, c.txtComentario from tbl_comentarios_x_solicitud c where c.txtIdSolicitud = '" + strCodigo + "'";
    Vector arrDatos = GestionSQL.consultaSQL(strSQL, "3");
    
    for(int i=0;i<arrDatos.size();i++){
        strTemp = arrDatos.get(i).toString().split(">");
        arrFechas.add(strTemp[0]);
        arrAutores.add(strTemp[1]);
        arrComentarios.add(strTemp[2]);
    }
    
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="SHORTCUT ICON" href="Images/App.ico" />
        <link rel="stylesheet" type="text/css" href="Styles/forms.css" />
        <title>Sistema de Consulta a la Plataforma SIU - Histórico de comentarios</title>
    </head>
    <body>
        <header>
            <jsp:include page="header.jsp" />  
       </header>
       <section>
            <div align="center">
                <br><br>
                <table cellspacing="0" cellpadding="0" border="0" class="TABLACONTENEDORA">
                        <tr>
                            <td class="TITULOFORM">HISTÓRICO DE COMENTARIOS DE LA SOLICITUD #<%=strCodigo%></td>
                        </tr>                
                        <tr>
                            <td>                                        
                                    <table cellspacing="0" cellpadding="4" border="0" class="TABLAMAESTRO">                  
                                        <tr>
                                            <td class="SUBTITULOFORM" style="border-right: 1px solid #116043">Fecha del comentario<br>(aaaa-mm-dd)</td>
                                            <td class="SUBTITULOFORM" style="border-right: 1px solid #116043">Autor del comentario</td>
                                            <td class="SUBTITULOFORM">Comentario</td>
                                        </tr>
                                        <% for(int i=0;i<arrFechas.size();i++){%>
                                            <tr>
                                                <td class="DATOREPORTE" style="text-align: center;width: 150px;border-right: 1px solid #116043"><%=arrFechas.get(i)%></td>
                                                <td class="DATOREPORTE" style="text-align: center;width: 150px;border-right: 1px solid #116043"><%=arrAutores.get(i)%></td>
                                                <td class="DATOREPORTE" style="text-align: left;"><%=arrComentarios.get(i)%></td>
                                            </tr>
                                        <%}%>                      
                                        <tr>
                                            <td colspan="3" class="CELDABOTONFORM">
                                                <input type="button" value="Salir" class="BOTONFORM" onclick="javascript:window.close();" />
                                            </td>
                                        </tr>
                                    </table>
                            </td>
                        </tr>
                </table>
            </div>
        </section>
       <footer>        
        <div id="dFooter" class="FOOTER">
            <jsp:include page="footer.jsp" />          
        </div>
       </footer>
    </body>
</html>
